<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <style>
    body {
      width: 240px;
      padding: 16px;
      margin: 0;
      font-family: 'Segoe UI', Arial, sans-serif;
      background-color: #f9f9f9;
    }

    .container {
      text-align: center;
    }

    .title {
      color: #333;
      margin-bottom: 16px;
      font-size: 18px;
      font-weight: 600;
    }

    .btn-group {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 15px;
    }

    .capture-btn {
      background-color: #4285f4;
      color: white;
      border: none;
      padding: 10px 15px;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.3s ease;
      font-size: 14px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .capture-btn:hover {
      background-color: #3367d6;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }

    .capture-btn:disabled {
      background-color: #cccccc;
      cursor: not-allowed;
      box-shadow: none;
    }

    .capture-btn.loading {
      animation: pulse 1.5s infinite;
    }

    .capture-btn svg {
      margin-right: 8px;
      width: 16px;
      height: 16px;
    }

    .progress-container {
      display: none;
      margin-top: 15px;
      position: relative;
      width: 100px;
      height: 100px;
      margin-left: auto;
      margin-right: auto;
    }

    .progress-circle {
      transform: rotate(-90deg);
      width: 100px;
      height: 100px;
    }

    .progress-circle circle {
      fill: none;
      stroke-width: 8;
    }

    .progress-circle .bg {
      stroke: #f0f0f0;
    }

    .progress-circle .progress {
      stroke: #4285f4;
      stroke-dasharray: 251.2;
      stroke-dashoffset: 251.2;
      transition: stroke-dashoffset 0.3s ease;
    }

    .status-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      font-size: 14px;
      color: #666;
    }

    .separator {
      height: 1px;
      background-color: #e0e0e0;
      margin: 15px 0;
    }

    .footer {
      font-size: 12px;
      color: #888;
      margin-top: 10px;
    }

    @keyframes pulse {
      0% { opacity: 1; }
      50% { opacity: 0.6; }
      100% { opacity: 1; }
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="title">Smart Capture</div>
    
    <div class="btn-group">
      <!-- 可见区域截图按钮 -->
      <button id="captureBtn" class="capture-btn">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
          <path d="M3 3h18v18H3V3zm16 16V5H5v14h14z"/>
          <path d="M14 7h3v3h-3zM7 14h3v3H7z"/>
        </svg>
        截取可见区域
      </button>
      
      <!-- 滚动截屏按钮 -->
      <button id="captureFullPageBtn" class="capture-btn">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
          <path d="M3 3h18v18H3V3zm16 16V5H5v14h14z"/>
          <path d="M7 7h10v2H7zM7 11h10v2H7zM7 15h7v2H7z"/>
        </svg>
        滚动截屏
      </button>
    </div>
    
    <div class="progress-container">
      <svg class="progress-circle">
        <circle class="bg" cx="50" cy="50" r="40"></circle>
        <circle class="progress" cx="50" cy="50" r="40"></circle>
      </svg>
      <div class="status-text">准备中...</div>
    </div>
    
    <div class="footer">版本 1.0.3</div>
  </div>
  <script src="popup.js"></script>
</body>
</html>